using System;
using Coderoom.ScrumPlanner.Domain;
using Xunit;

namespace Coderoom.ScrumPlanner.Tests.Unit.ContainerTests
{
	public class EntityCollectionTests
	{
		[Fact]
		public void Ctor_populates_instance_from_IEnumerableOfProject()
		{
			// arrange
			var data = new[] {new Project {Id = Guid.NewGuid()}, new Project {Id = Guid.NewGuid()}};

			// act
			var collection = new ProjectCollection(data);

			// assert
			Assert.Equal(data.Length, collection.Count);
			Assert.Equal(data[0].Id, collection[0].Id);
			Assert.Equal(data[1].Id, collection[1].Id);
		}
	}
}